package user

import (
	"time"
)

const ModuleUser = "user"
const ActionLogin = "login"
const ActionSetPassword = "set-password"
const MethodLoginPassword = "login-password"
const MethodLoginSmsCode = "login-sms-code"
const MethodLoginSso = "login-sso"
const MethodSetPassword = "set-password"

// GfyxUserBehaviorPo 表示用户行为日志表的 GORM 模型
type GfyxUserBehaviorPo struct {
	ID         int64     `gorm:"column:id;primaryKey"`
	Device     string    `gorm:"column:device"`
	Module     string    `gorm:"column:module"`
	Action     string    `gorm:"column:action"`
	UserID     string    `gorm:"column:user_id"`
	Token      string    `gorm:"column:token"`
	Method     string    `gorm:"column:method"`
	Params     string    `gorm:"column:params"`
	ClientIP   string    `gorm:"column:client_ip"`
	Status     int       `gorm:"column:status"`
	CreatedOn  time.Time `gorm:"column:created_on"`
	CreatedBy  string    `gorm:"column:created_by"`
	ModifiedOn time.Time `gorm:"column:modified_on"`
	ModifiedBy string    `gorm:"column:modified_by"`
	IsDeleted  int       `gorm:"column:is_deleted"`
}

// TableName 指定模型的表名称
func (g GfyxUserBehaviorPo) TableName() string {
	return "gfyx_user_behavior"
}
